<template>
  <div id="app">
    <HeaderNav></HeaderNav>
    <router-view/>
    <BottomNav></BottomNav>
    <div class="page_right">
      <el-tooltip placement="right" :hide-after="0" effect="light">
        <div slot="content">
          <el-link :href="$store.state.configInfo.qq" type="primary">{{ $t('APP.qq') }}</el-link>
        </div>
        <div class="item">
          <img src="@/assets/home/qq.png" alt="">
        </div>
      </el-tooltip>
      <el-tooltip placement="right" effect="light">
        <div slot="content">
          <img style="width: 300px;height: 300px" :src="$assetsURL + $store.state.configInfo.wechat" alt="" srcset="">
        </div>
        <div class="item">
          <img src="@/assets/home/wx.png" alt="">
        </div>
      </el-tooltip>
      <el-tooltip placement="right" effect="light">
        <div slot="content">{{ $store.state.configInfo.phone }}</div>

        <div class="item">
          <img src="@/assets/home/phone.png" alt="">
        </div>
      </el-tooltip>

    </div>
  </div>
</template>

<style lang="scss">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.cop {
  width: 100% !important;
  margin-top: 0 !important;
  left: 0 !important;
  padding: 30px !important;

  .popper__arrow {
    display: none;
  }
}

.nav_show {
  width: 1200px;
  height: 460px;
  margin: 0 auto;
  display: flex;

  .nav_show_item {
    width: 400px;
    border-left: 2px solid #F6F6F6;
    background-color: #FFFFFF;
    padding: 0 30px;

    .nav_show_line {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-top: 15px;


      img {
        width: 12px;
        height: 12px;
      }
    }

    .nav_show_line_active {
      color: #00A3E6;
    }
  }
}

.page_right {
  position: fixed;
  width: 48px;
  height: 152px;
  right: 0;
  top: 336px;
  z-index: 9;

  .content {
    background-color: #FFFFFF !important;
  }

  .item {
    width: 48px;
    height: 50px;
    background-color: #00A3E6;
    border-bottom: 1px dashed #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;

    &:nth-child(3) {
      border-bottom: none;
    }

    img {
      width: 24px;
      height: 24px;
    }
  }

}

.loginInfo {
  box-sizing: border-box;

  .top {
    display: flex;
    margin-bottom: 10px;

    .right {
      margin-left: 12px;

      div:nth-child(1) {
        color: #333333;
        font-weight: bold;
        font-size: 16px;
      }

      div:nth-child(2) {
        color: #666666;
        font-size: 12px;
      }
    }
  }

  .item {
    margin: 20px 0;
    display: flex;
    align-items: center;

    img {
      width: 16px;
      height: 16px;
      margin-right: 12px;
    }

    font-size: 14px;
    color: #333333;
  }

  .item:nth-child(1) {
    border-bottom: 1px solid #F6F6F6;
  }
}

*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

*::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 5px;
}

// 兼容Firefox、IE
* {
  scrollbar-width: 6px;
  scrollbar-base-color: green;
  scrollbar-track-color: red;
  scrollbar-arrow-color: blue;
}

.productNameColor {
  color: #00A3E6 !important;
}
</style>

<script>
import HeaderNav from "@/components/HeaderNav.vue"
import BottomNav from "@/components/BottomNav.vue"
import {getConfig} from "@/api/home";

export default {
  name: 'App',
  components: {
    HeaderNav,
    BottomNav
  },
  data: () => ({
    config: {}
  }),
  created() {

    getConfig().then(res => {
      this.$store.commit("setConfigInfo", res.data)
      document.title = res.data.sitetitle
    })
    this.$store.commit("setToken", localStorage.getItem("Token"))
    this.$store.commit("setUserInfo", JSON.parse(localStorage.getItem("UserInfo")))
    let sessionLanguage = sessionStorage.getItem("language")
    if (sessionLanguage == 'zh' || sessionLanguage == 'en') {

      this.$i18n.locale = sessionLanguage;
      this.$store.commit("setLanguage", sessionLanguage)

    } else {
      this.$i18n.locale = 'zh';
      this.$store.commit("setLanguage", "zh")
    }
  },
  mounted() {


  }
}
</script>
